extends Resource
class_name Item_definition

var prefix=""
export(String) var id = "cotton_candy"
export(String) var name = "Cotton candy"
export(String) var category = "food"
export(String) var description = "Tasty fluff with lots of sugar!"
export(PoolStringArray) var tags = ["soft", "sweet", "pink", "edible"]
export(int) var base_value = 100
export(Resource) var armor_stats = null
export(Resource) var wapeon_stats = null


func full_name():
	return self.name

func icon():
	var path = prefix + ".png"
	if OS.has_feature("standalone"):
		var resource = load(path)
		return resource
	else:
		var f = File.new()
		if f.file_exists(path):
			return load(path)
	return preload("res://2d/unknown_icon.png")
